Dump GC Heap contents In this example, the cache holds 130 KB.
Find the amount of data being cached in a Web application
Comments:
Often, what resembles a memory leak might simply be unnecessary
caching. Followe these steps to find out how much data is being
cached in an ASP.NET Web application.
1: Find the method table for System.Web.Caching.Cache
0:000> !name2ee System.Web.dll System.Web.Caching.Cache
--------------------------------------
MethodTable: 0d7577f8
EEClass: 0d73ac40
Name: System.Web.Caching.Cache
2: Find the total size of objects referenced by the
cache.
0:000> !DumpHeap -mt 0d7577f8
Address MT Size
0507f754 0d7577f8 12
total 1 objects
Statistics:
MT Count TotalSize Class Name
d7577f8 1 12 System.Web.Caching.Cache
Total 1 objects
large objects
Address MT Size
total 0 large objects
Find number of bytes that this object keeps alive on the garbage collected
heap.
0:000> !objsize 0507f754
sizeof(0507f754) = 130108 ( 0x1fc3c) bytes (System.Web.Caching.Cache)